<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>过滤器</title>
		<script src="../js/vue.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="app">
			<div>
				{{num | RMB}}
			</div>
		</div>
		
		<script type="text/javascript">
			Vue.filter('RMB',function(data){
				console.log(data);
				var str = '';
				str = data.toFixed(2);
				
				return str+'￥';
			})
			
			var vm = new Vue({
				el:'#app',
				data:{
					num:1000
				}
			})
		</script>
	</body>
</html>
